import 'package:json_annotation/json_annotation.dart';
part 'nutrition_facts_model.g.dart';

/// 营养model
@JsonSerializable()
class NutritionFactsModel {
  /// 能量数量
  String? amount;
  /// 能量名称
  String? nutrient;
  /// 背景颜色
  String? pie_chart_color;
  /// calorie
  int? calorie;

  NutritionFactsModel(
      this.amount, this.nutrient, this.pie_chart_color, this.calorie);

  factory NutritionFactsModel.fromJson(Map<String, dynamic> json) =>
      _$NutritionFactsModelFromJson(json);

  Map<String, dynamic> toJson() => _$NutritionFactsModelToJson(this);
}
